<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>Title</title>
  </head>
  <body>
    <div id="app"></div>
    <script>
      let s = "abcabcabacdef";
      let t = "aba";
      let i = 0,
        j = 0,
        m = s.length,
        n = t.length;
      while (i < m && j < n) {
        if (s[i] == t[j]) {
          i++;
          j++;
        }
      }
    </script>
  </body>
</html>
